﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using VSM.Admin.UserManagement;

namespace VSM
{
    public class LoginUser : ElementBase
    {
        #region Fields
        private string   id_user     = string.Empty;
        private string   user_name    = string.Empty;
        private string   password    = string.Empty;
        private bool     active      = false;
        private bool     isadmin     = false;
        private string   id_dealer   = string.Empty;
        private string   default_vendor = string.Empty;
        private string   email       = string.Empty;
        private string   remark      = string.Empty;
        private string   id_language = string.Empty;
        private string   createduser = string.Empty;
        private DateTime createdtime = DateTime.MinValue;
        private string   updateduser = string.Empty;
        private DateTime updatedtime = DateTime.MinValue;

        private AccessRight[] access_right = null;
        #endregion

        #region Properties

        public string UserCode
        {
            get { return this.id_user; }
        }
        public string UserName
        {
            get { return this.user_name; }
        }

        public string Password
        {
            get { return this.password; }
        }
        public bool IsActive
        {
            get { return this.active; }
        }
        public bool IsAdmin
        {
            get { return this.isadmin; }
        }
        public string ID_Dealer
        {
            get { return this.id_dealer; }
        }

        public string Default_Vendor
        {
            get { return this.default_vendor; }
        }

        public string Email
        {
            get { return this.email; }
        }
        public string Remark
        {
            get { return this.remark; }
        }
        public string ID_Language
        {
            get { return this.id_language; }
        }
        public string CreatedUser
        {
            get { return this.createduser; }
        }
        public DateTime CreatedTime
        {
            get { return this.createdtime; }
        }
        public string UpdatedUser
        {
            get { return this.updateduser; }
        }
        public DateTime UpdatedTime
        {
            get { return this.updatedtime; }
        }

        #endregion

        #region Methods
        public LoginUser(string UserCode, string UserName, string Password, bool IsActive, bool IsAdmin, string ID_Dealer, string Default_Vendor, 
            string Email, string Remark, string ID_Language, string CreatedUser, DateTime CreatedTime, string UpdatedUser, DateTime UpdatedTime)
        {
            this.id_user = UserCode;
            this.user_name = UserName;
            this.password = Password;
            this.active = IsActive;
            this.isadmin = IsAdmin;
            this.id_dealer = ID_Dealer;
            this.default_vendor = Default_Vendor;
            this.email = Email;
            this.remark = Remark;
            this.id_language = ID_Language;
            this.createduser = CreatedUser;
            this.createdtime = CreatedTime;
            this.updateduser = UpdatedUser;
            this.updatedtime = UpdatedTime;
        }

        public bool UpdateUser(string Password, bool IsActive, bool IsAdmin, string ID_Dealer, 
            string Default_Vendor, string Email, string Remark, string ID_Language, string UpdatedUser, DateTime UpdatedTime)
        { 
            return true;
        }

        public bool AddUser(string UserCode, string UserName, string Password, bool IsActive, bool IsAdmin, 
            string ID_Dealer, string Default_Vendor, string Email, string Remark, string ID_Language, string CreatedUser, DateTime CreatedTime)
        {
            return true;
        }

        #endregion

    }
}